package cn.com.kisen.kdc.mapper.weighing;

import cn.com.kisen.kdc.domain.StatisData;
import cn.com.kisen.kdc.domain.weighing.SimpleWeighingRecord;

import java.util.List;

public interface WeighingRecordMapper {

    List<SimpleWeighingRecord> list(long startTime, long endTime);

    Long count(long startTime, long endTime);

    /**
     * 查询货物出入厂累积量
     *  实例中是指统计2018-01-01至2018-01-07的累积量
     *  包含2018-01-07一整天的数据
     * @param inout             进厂  or 出厂
     * @param materialName      货名
     * @return
     */
    List<StatisData> sum(int inout, String materialName, long startTime, long endTime);

    List<StatisData> sumByday(int inout, String materialName, long startTime, long endTime);

    List<StatisData> sumBy(int inout, String materialName, String datePattern, String date);

    List<String> listAllMaterialName();
}
